public class Page_96_6 {
    public static void main(String[] args) {
        int arr[][] = new int[20][5];
        int brr[] = new int[20];
        int i,j,sum = 0;
        System.out.println("名字 coreC++   coreJava  Servlet   JSP       EJB        总分 ");
        for(i = 0;i < 20;i++)
        {
            boolean t = true;
            for(j = 0;j < 5;j++)
            {
                if(j == 0)
                {
                    System.out.printf("%-5d",i);
                }
                arr[i][j] = (int)(Math.random()*100);
                sum = sum +arr[i][j];
                System.out.printf("%-10d",arr[i][j]);
            }
            brr[i] = sum;
            sum = 0;
            System.out.printf("%-10d",brr[i]);
            System.out.println();

        }
        System.out.printf("平均分");


        for(i = 0;i < 5;i++)
        {
            int avg = 0;
            for(j = 0;j < 20;j++)
            {
                avg = avg + arr[j][i];

            }
            System.out.printf("%-10d",avg/20);
        }
        int m = 0;
        for(i = 0;i < 20;i++)
        {
            m = m =+ brr[i];

        }
        System.out.printf("%-10d",m);
    }
}
